import request from '@/utils/request'

export default {

    join(joinKey,sid){
        return request({
            url: `classes/student`,
            method: 'post',
            data:{"joinKey":joinKey,
                  "sid":sid,
                }
        })
    },

    queryClassesListBySid(sid){
        return request({
            url: `classes/classes/list/${sid}`,
            method: 'get',
        })
    },

    // 根据班级id获取考试列表
    getTestListByClassId(id,userId){
        return request({
            url:`list/classes/${id}`,
            method:'get',
            params:{"userId":userId},
            baseURL:'http://api.exam.com/api/test/'
        })
    },

    subResult(answerList,pId){
        return request({
            url: `/paper/exam/evaluation`,
            method: 'post',
            data:{"pId":pId,"answerList":answerList},
            
        })
    }

}